import { _decorator, Component, Label, Node } from 'cc';
import GameAssets from '../../manager/game.assets';
const { ccclass, property } = _decorator;

@ccclass('FruitSpecial')
export class FruitSpecial extends Component {

	protected onLoad(){
		mtec.cc.skinPeeler(this.node.getChildByName('icon-symbol'), GameAssets.getCounTexture(6), {height: true});
	}

	show(str_symbol: string, str_diamond: string){
		let np = new mtec.NudityPromise<Node>();
		this.node.active = true;
		this.node.getChildByName('lbl-symbol').getComponent(Label).string = str_symbol;
		this.node.getChildByName('lbl-diamond').getComponent(Label).string = str_diamond;
		mtec.delay(1.3, ()=>np.resolve(this.node));
		return np.promise;
	}
}
